package com.manor.main.personalcenter;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.manor.common.activity.AbsActivity;
import com.manor.common.utils.RouteUtil;
import com.manor.main.R;
import com.manor.main.adapter.VisitorRecordAdapter;
import com.manor.main.bean.VisitorRecordBean;

import java.util.ArrayList;
import java.util.List;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

/**
 * 访客记录
 * Created by twq on 2020.3.26
 */
@Deprecated
@Route(path = RouteUtil.PC_VISITOR_RECORD)
public class VisitorRecordActivity extends AbsActivity {
    @Override
    protected int getLayoutId() {
        return R.layout.activity_visitor_record;
    }

    RecyclerView rvVisitorRecord;
    VisitorRecordAdapter visitorRecordAdapter;
    private List<VisitorRecordBean> visitorRecordBeanList = new ArrayList<>();

    @Override
    protected void main() {
        super.main();
        setTitle("访客记录");
        initView();
//        ImmersionBar.with(this)
//                .statusBarColor(R.color.title)
//                .init();
        initDate();
    }

    private void initDate() {
        setListDate();
        rvVisitorRecord.setLayoutManager(new LinearLayoutManager(this));
        visitorRecordAdapter = new VisitorRecordAdapter(R.layout.rv_visitor_record_item, visitorRecordBeanList);
        rvVisitorRecord.setAdapter(visitorRecordAdapter);

    }

    private void setListDate() {
        for (int i = 0; i < 10; i++) {
            visitorRecordBeanList.add(new VisitorRecordBean(R.mipmap.msg_head_test, "Aamimi" + i, "20", "2020年3月50日"));
        }

    }

    private void initView() {
        rvVisitorRecord = findViewById(R.id.rv_visitor_record);
    }
}
